Conditions | 3 |
Paths | 2 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | const util = require('../util') |
||
14 | util.request('kits/short').end(function (response) { |
||
15 | if (response.error || !response.body) { |
||
16 | stopSpinner(response.error) |
||
17 | process.exit() |
||
18 | } |
||
19 | |||
20 | stopSpinner() |
||
21 | var list = response.body.data.sort(function (a, b) { |
||
22 | if (a === 'basic') { |
||
23 | return -1 |
||
24 | } |
||
25 | if (b === 'basic') { |
||
26 | return 1 |
||
27 | } |
||
28 | return a > b ? 1 : -1 |
||
29 | }) |
||
30 | |||
31 | Kits.cache = list |
||
32 | callback(list) |
||
33 | }) |
||
34 | } |
||
37 |